Return to start page
Core/Environment/Library Special Effect.j
1 library ALibraryCoreEnvironmentSpecialEffect
2
3 /// Creates a single special effect which only can be seen by player @param user.
4 /// @author Tamino Dauth
5 function CreateSpecialEffectForPlayer takes player user, string modelPath, real x, real y returns effect
6 local player localPlayer = GetLocalPlayer()
7 local string localPath = ""
8 if (user == localPlayer) then
9 set localPath = modelPath
10 endif
11 set localPlayer = null
12 return AddSpecialEffect(localPath, x, y)
13 endfunction
14
15 /// Creates a single special effect on widget's @param target attachement point @param attachPoint with model file @param model path.
16 /// The created special effect is only visible to player @param user.
17 function CreateSpecialEffectOnTargetForPlayer takes player user, string modelPath, widget target, string attachPoint returns effect
18 local player localPlayer = GetLocalPlayer()
19 local string localPath = ""
20 if (user == localPlayer) then
21 set localPath = modelPath
22 endif
23 set localPlayer = null
24 return AddSpecialEffectTarget(localPath, target, attachPoint)
25 endfunction
26
27 endlibrary